Optimal. Leaf size=101 \[ -\frac {2 \sec (e+f x) (a \sin (e+f x)+a)^{3/2}}{a f}+\frac {5 \sec (e+f x) \sqrt {a \sin (e+f x)+a}}{f}-\frac {\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a}}\right )}{\sqrt {2} f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.18, antiderivative size = 101, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {2713, 2855, 2649, 206} \[ -\frac {2 \sec (e+f x) (a \sin (e+f x)+a)^{3/2}}{a f}+\frac {5 \sec (e+f x) \sqrt {a \sin (e+f x)+a}}{f}-\frac {\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a}}\right )}{\sqrt {2} f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 2649
Rule 2713
Rule 2855
Rubi steps
\begin {align*} \int \sqrt {a+a \sin (e+f x)} \tan ^2(e+f x) \, dx &=-\frac {2 \sec (e+f x) (a+a \sin (e+f x))^{3/2}}{a f}+\frac {2 \int \sec ^2(e+f x) \sqrt {a+a \sin (e+f x)} \left (\frac {3 a}{2}+a \sin (e+f x)\right ) \, dx}{a}\\ &=\frac {5 \sec (e+f x) \sqrt {a+a \sin (e+f x)}}{f}-\frac {2 \sec (e+f x) (a+a \sin (e+f x))^{3/2}}{a f}+\frac {1}{2} a \int \frac {1}{\sqrt {a+a \sin (e+f x)}} \, dx\\ &=\frac {5 \sec (e+f x) \sqrt {a+a \sin (e+f x)}}{f}-\frac {2 \sec (e+f x) (a+a \sin (e+f x))^{3/2}}{a f}-\frac {a \operatorname {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\frac {a \cos (e+f x)}{\sqrt {a+a \sin (e+f x)}}\right )}{f}\\ &=-\frac {\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a+a \sin (e+f x)}}\right )}{\sqrt {2} f}+\frac {5 \sec (e+f x) \sqrt {a+a \sin (e+f x)}}{f}-\frac {2 \sec (e+f x) (a+a \sin (e+f x))^{3/2}}{a f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.34, size = 114, normalized size = 1.13 \[ \frac {\sec (e+f x) \sqrt {a (\sin (e+f x)+1)} \left (-2 \sin (e+f x)+(1-i) \sqrt [4]{-1} \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right ) \tanh ^{-1}\left (\left (\frac {1}{2}+\frac {i}{2}\right ) (-1)^{3/4} \sec \left (\frac {f x}{4}\right ) \left (\cos \left (\frac {1}{4} (2 e+f x)\right )-\sin \left (\frac {1}{4} (2 e+f x)\right )\right )\right )+3\right )}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.43, size = 169, normalized size = 1.67 \[ \frac {\sqrt {2} \sqrt {a} \cos \left (f x + e\right ) \log \left (-\frac {a \cos \left (f x + e\right )^{2} - 2 \, \sqrt {2} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {a} {\left (\cos \left (f x + e\right ) - \sin \left (f x + e\right ) + 1\right )} + 3 \, a \cos \left (f x + e\right ) - {\left (a \cos \left (f x + e\right ) - 2 \, a\right )} \sin \left (f x + e\right ) + 2 \, a}{\cos \left (f x + e\right )^{2} - {\left (\cos \left (f x + e\right ) + 2\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 2}\right ) - 4 \, \sqrt {a \sin \left (f x + e\right ) + a} {\left (2 \, \sin \left (f x + e\right ) - 3\right )}}{4 \, f \cos \left (f x + e\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {a \sin \left (f x + e\right ) + a} \tan \left (f x + e\right )^{2}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.73, size = 89, normalized size = 0.88 \[ -\frac {\left (1+\sin \left (f x +e \right )\right ) \left (\sqrt {a}\, \sqrt {2}\, \arctanh \left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) \sqrt {a -a \sin \left (f x +e \right )}+4 a \sin \left (f x +e \right )-6 a \right )}{2 \cos \left (f x +e \right ) \sqrt {a +a \sin \left (f x +e \right )}\, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {a \sin \left (f x + e\right ) + a} \tan \left (f x + e\right )^{2}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int {\mathrm {tan}\left (e+f\,x\right )}^2\,\sqrt {a+a\,\sin \left (e+f\,x\right )} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {a \left (\sin {\left (e + f x \right )} + 1\right )} \tan ^{2}{\left (e + f x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________